$def with(new_station)
<h3 class="page-title">监测站管理</h3>

<div class="well">
    <h3>录入监测站信息</h3>
    <form action="/stations/create" method="post"  id="defaultForm" class="form-horizontal">
        <div class="control-group">
            <label class="control-label" >名称</label>
            <div class="controls">
                <input type="text" name="name"  id="name" placeholder="请输入监测站名称" class="input-xlarge">
            </div>
        </div>

        <div class="control-group">
            <div class="controls">
            <input type="submit" class="btn btn-primary" value="保存" ></input>
            <a href="/stations" data-toggle="modal" class="btn">返回</a>
                </div>
        </div>
    </form>
</div>
<script type="text/javascript">
$$(document).ready(function() {
    $$( "#defaultForm" ).validate( {
        rules: {
            name: {
                required: true,
                minlength: 2
            }
        },
        messages: {
            name: {
                required: "请输入站点名称",
                minlength: "站点名称必须在2个字符以上"
            }
        },
        errorElement: "em",
        errorPlacement: function ( error, element ) {
            // Add the `help-block` class to the error element
            error.addClass( "help-block" );

            if ( element.prop( "type" ) === "checkbox" ) {
                error.insertAfter( element.parent( "label" ) );
            } else {
                error.insertAfter( element );
            }
        },
        highlight: function ( element, errorClass, validClass ) {
            $$( element ).parents( ".controls" ).addClass( "has-error" ).removeClass( "has-success" );
        },
        unhighlight: function (element, errorClass, validClass) {
            $$( element ).parents( ".controls" ).addClass( "has-success" ).removeClass( "has-error" );
        }
    } );

});
</script>